repo: [scan-build]: Mark a variable used
authorColin Walters <walters@verbum.org>
Mon, 14 Oct 2019 14:24:18 +0000 (14:24 +0000)
committerColin Walters <walters@verbum.org>
Tue, 15 Oct 2019 12:41:27 +0000 (12:41 +0000)
We're just using this to auto-free, quiet the static analysis.

src/libostree/ostree-repo-commit.c

index 0aaebbdb58ad480287e04aa749c4a1e5bcddef0b..d057ea34d240c2667fb4e2a15c4e381da567364a 100644 (file)
@@ -871,7 +871,10 @@ write_content_object (OstreeRepo         *self,
       /* Give a null input if there's no content */
       g_autoptr(GInputStream) null_input = NULL;
       if (!input)
-        null_input = input = g_memory_input_stream_new_from_data ("", 0, NULL);
+        {
+          null_input = input = g_memory_input_stream_new_from_data ("", 0, NULL);
+          (void) null_input;  /* quiet static analysis */
+        }
       checksum_input = ot_checksum_instream_new_with_start (input, G_CHECKSUM_SHA256,
                                                             buf, len);